# XML output parser

The `XMLOutputParser` takes language model output which contains XML and parses it into a JSON object.

The output parser also supports streaming outputs.

Currently, the XML parser does not contain support for self closing tags, or attributes on tags.

## Usage

import CodeBlock from "@theme/CodeBlock";

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/core
```

import XMLExample from "@examples/prompts/xml_output_parser.ts";

<CodeBlock language="typescript">{XMLExample}</CodeBlock>

## Streaming

import XMLStreamingExample from "@examples/prompts/xml_output_parser_streaming.ts";

<CodeBlock language="typescript">{XMLStreamingExample}</CodeBlock>
